﻿using Mozi.HttpEmbedded.Generic;

namespace Mozi.Live.SDP
{
    /// <summary>
    /// SDP媒体类型
    /// </summary>
    public class SDPMediaType : AbsClassEnum
    {

        /// <summary>
        /// audio
        /// </summary>
        public static SDPMediaType Audio = new SDPMediaType("audio");
        /// <summary>
        /// video
        /// </summary>
        public static SDPMediaType Video = new SDPMediaType("video");
        /// <summary>
        /// text
        /// </summary>
        public static SDPMediaType Text = new SDPMediaType("text");
        /// <summary>
        /// application
        /// </summary>
        public static SDPMediaType Application = new SDPMediaType("application");
        /// <summary>
        /// message
        /// </summary>
        public static SDPMediaType Message = new SDPMediaType("message");
        /// <summary>
        /// control
        /// </summary>
        public static SDPMediaType Control = new SDPMediaType("control");
        /// <summary>
        /// data
        /// </summary>
        public static SDPMediaType Data = new SDPMediaType("data");

        private string _name;
        /// <summary>
        /// 
        /// </summary>
        public string Name { get => _name; set => _name = value; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        public SDPMediaType(string name)
        {
            _name = name;
        }
        protected override string Tag => _name;

        public override string ToString()
        {
            return Tag;
        }
    }

}
